using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Data.Sql;
using System.Data;

namespace DataAccessLayer
{
    public  class Deletion
    {
        private string connstring;
        
        public Deletion(string conn)
        {
            connstring=conn;
        }
        public void delUser(int uid)
        {
            SqlConnection con = new SqlConnection(connstring);
            con.Open();
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = con;
            cmd.CommandText = "sp_delete_user";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add(new SqlParameter("@uid", uid));
            cmd.ExecuteNonQuery();
       }
       public void delDoc(int reg)
       {
           SqlConnection con = new SqlConnection(connstring);
           con.Open();
           SqlCommand cmd = new SqlCommand();
           cmd.Connection = con;
           cmd.CommandText = "sp_delete_doctor";
           cmd.CommandType = CommandType.StoredProcedure;
           cmd.Parameters.Add(new SqlParameter("@reg", reg));
           cmd.ExecuteNonQuery();
       }
    }
}
